package org.jeecg.common.modules.doctor.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.modules.doctor.entity.DoctorAssistantRelation;
import org.jeecg.common.util.enums.StatusEnum;

import java.util.List;

/**
 * @Description: doctor_assistant_relation
 * @Author: jeecg-boot
 * @Date:   2020-08-15
 * @Version: V1.0
 */
public interface IDoctorAssistantRelationService extends IService<DoctorAssistantRelation> {

    /**
     * 是否已存在关系
     * @param doctorId
     * @param assistantId
     * @return
     */
    boolean exists(String doctorId,String assistantId);

    /**
     * 保存医助关系
     * @param doctorId
     * @param assistantId
     * @param assistantName
     */
    void saveDoctorAssistant(String doctorId,String assistantId,String assistantName);

    /**
     * 开启/禁用助理
     * @param doctorAssistantRelation
     * @param status
     */
    void updateStatus(DoctorAssistantRelation doctorAssistantRelation, StatusEnum status);


    /**
     * 获取医生所有开起的助理
     * @param doctorId
     * @return
     */
    List<DoctorAssistantRelation> queryByDoctorId(String doctorId);

    /**
     * 获取医助关系
     * @param doctorId
     * @param assistantId
     * @return
     */
    DoctorAssistantRelation getRelation(String doctorId,String assistantId);

    /**
     * 获取医助关系
     * @param assistantId
     * @return
     */
    List<DoctorAssistantRelation> getRelation(String assistantId);
}
